<template>
  <div>
    <el-dialog title="其他入库质检"  width="1300px" @open="open" class="icon-dialog" :visible.sync="show" :before-close="closeForm" append-to-body>
      <el-form ref="form" :model=" otherinspectform " size="small" label-width="80px" :inline="true" class="header">
        <el-row :gutter="20">
          <el-col :span="8">
            <el-form-item label="单据编号:" class="no-wrap-label">{{ otherinspectform.billNo }}</el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="称重申请单单据编号:" class="no-wrap-label" label-width="150px">{{ otherinspectform.weightNo }}</el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="组织名称:" class="no-wrap-label">{{ otherinspectform.orgName }}</el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="部门编码:" class="no-wrap-label">{{ otherinspectform.deptNumber }}</el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="质检人员:" class="no-wrap-label">{{ otherinspectform.inspectUser }}</el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="审核状态:" class="no-wrap-label">{{ otherinspectform.status }}</el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="质检时间:" class="no-wrap-label">{{ otherinspectform.inspectDate }}</el-form-item>
          </el-col>
        </el-row>
        <br />
      </el-form>

      <el-table :data="otherinspectList" height="calc(100vh - 300px)">
        <el-table-column label="单据编号" width="160" prop="billNo"></el-table-column>
        <el-table-column label="物料编码" width="120" prop="materialNo"></el-table-column>
        <el-table-column label="物料名称" width="120" prop="materialName"></el-table-column>
        <el-table-column label="物料规格" width="120" prop="specification"></el-table-column>
        <el-table-column label="单位名称" width="120" prop="unitName"></el-table-column>
        <el-table-column label="单位编码" width="120" prop="unitNo"></el-table-column>
        <el-table-column label="批次号" width="120" prop="flot"></el-table-column>
        <el-table-column label="检验数量" width="120" prop="inspectQty"></el-table-column>
        <el-table-column label="合格数量" width="120" prop="qualifiedQty"></el-table-column>
        <el-table-column label="不合格数量" width="120" prop="unqualifiedQty"></el-table-column>
        <el-table-column label="检验结果" width="120" prop="result"></el-table-column>
        <el-table-column label="辅助单位编码" width="120" prop="fauxUnitNo"></el-table-column>
        <el-table-column label="辅助单位名称" width="120" prop="fauxUnitName"></el-table-column>
        <el-table-column label="是否质检" width="120">
          <template slot-scope="{ row }">
            {{ row.isChecked ? '是' : '否' }}
          </template>
        </el-table-column>
        <el-table-column label="称重申请单号" width="120" prop="weightNo"></el-table-column>
        <el-table-column label="是否异常" width="120">
          <template slot-scope="{ row }">
            {{ row.isAbnomal ? '是' : '否' }}
          </template>
        </el-table-column>
        <el-table-column label="异常处理单号" width="120" prop="abBillNo"></el-table-column>
        <el-table-column label="仓库编码" width="120" prop="stockNo"></el-table-column>
        <el-table-column label="仓库名称" width="120" prop="stockName"></el-table-column>
        <el-table-column label="仓位编码" width="120" prop="locationNo"></el-table-column>
        <el-table-column label="仓位名称" width="120" prop="locationName"></el-table-column>
      </el-table>


    </el-dialog>

  </div>
</template>
<script>
import { detail  } from '@/api/app/otherinspect'
export default {
	name:'otherinspectdetail',
	props: {
		show: {
			type: Boolean,
			default: true
		},
		size: {
			type: String,
			default: 'mini'
		},
		info: {
			type: Object,
		},
	},
	data() {
		return {
			form:{
			},
      otherinspectform:{},
      otherinspectList:[]
		}
	},
	watch:{
		show(val){
			if(val){
			}
		}
	},
	methods: {
    open(){
      detail(this.info).then(res => {
        if (res.status == 200) {
          this.otherinspectform = res.data.data;
          this.otherinspectList = res.data.dataList;


        } else {
          this.$message.error('获取详情失败2，请稍后再试');
        }
      }).catch(error => {

        this.$message.error('获取详情失败，请稍后再试');
      });
    },
    closeForm(){
      this.$emit('update:show', false)
    }
	}
}
</script>
<style  lang="scss">
@import '@/assets/scss/common.scss'
</style>
